import request from '@/utils/request'

// 查询药品入库列表
export function listWarehousing(query) {
  return request({
    url: '/drug/warehousing/list',
    method: 'get',
    params: query
  })
}
//根据订单id查询药品入库列表
export function listWarehousingByOrderId(warehousingOrderId) {
  return request({
    url: '/drug/intermediate/warehousingOrderId/'+warehousingOrderId,
    method: 'get',
  })
}
// 查询药品入库详细
export function getWarehousing(id) {
  return request({
    url: '/drug/warehousing/' + id,
    method: 'get'
  })
}

// 新增药品入库
export function addWarehousing(data) {
  return request({
    url: '/drug/warehousing',
    method: 'post',
    data: data
  })
}

// 修改药品入库
export function updateWarehousing(data) {
  return request({
    url: '/drug/warehousing',
    method: 'put',
    data: data
  })
}

// 删除药品入库
export function delWarehousing(id) {
  return request({
    url: '/drug/warehousing/' + id,
    method: 'delete'
  })
}
